package com.aiyan.edu.api.cms;

import com.aiyan.edu.framework.domain.cms.CmsSite;
import com.aiyan.edu.framework.domain.cms.CmsTemplate;
import com.aiyan.edu.framework.domain.cms.request.QueryTemplateRequest;
import com.aiyan.edu.framework.domain.cms.response.CmsSiteResult;
import com.aiyan.edu.framework.domain.cms.response.CmsTemplateResult;
import com.aiyan.edu.framework.model.response.QueryResponseResult;
import com.aiyan.edu.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author: zqzhou
 * @create: 2019/10/18 10:38
 **/
@Api(value = "cms页面模板管理接口", description = "cms页面模板管理接口，提供页面模板的增删改查")
public interface CmsTemplateControllerApi {

    /**
     * 分页查询模板
     *
     * @param page
     * @param size
     * @param queryTemplateRequest
     * @return
     */
    @ApiOperation("分页查询模板数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", required = true, paramType = "path", dataType = "int"),
            @ApiImplicitParam(name = "size", value = "每页数据条数", required = true, paramType = "path", dataType = "int")
    })
    public QueryResponseResult findList(int page, int size, QueryTemplateRequest queryTemplateRequest);

    /**
     * 根据ID查询模板信息
     *
     * @param id
     * @return
     */
    @ApiOperation("根据ID查询模板信息")
    @ApiImplicitParam(name = "id", value = "模板id", required = true, paramType = "path", dataType = "String")
    public CmsTemplateResult findById(String id);

    /**
     * 添加页面模板
     *
     * @param cmsTemplate
     * @return
     */
    @ApiOperation("添加页面模板")
    public CmsTemplateResult add(CmsTemplate cmsTemplate);

    /**
     * 上传模板文件
     *
     * @param file
     * @return
     */
    @ApiOperation("上传页面模板文件")
    public CmsTemplateResult uploadTemplateFile(MultipartFile file);

    /**
     * 删除页面
     *
     * @param id
     * @return
     */
    @ApiOperation("删除模板")
    @ApiImplicitParam(name = "id", value = "模板id", required = true, paramType = "path", dataType = "String")
    public ResponseResult delete(String id);

    /**
     * 修改模板
     *
     * @param id
     * @param cmsTemplate
     * @return
     */
    @ApiOperation("修改模板")
    @ApiImplicitParam(name = "id", value = "模板id", required = true, paramType = "path", dataType = "String")
    public CmsTemplateResult update(String id, CmsTemplate cmsTemplate);

}
